import httpInstance from "@/utils/http"

/*
params: {
	orderState:0,
  page:1,
  pageSize:2
}
*/

export const getUserOrder = (params) => {
    return httpInstance({
        url: '/order',
        method: 'GET',
        params
    })
}

export const updateOrderStatus = (id,status) => {
    return httpInstance({
        url: '/order/status',
        method: "PUT",
        data: {
            id: id,
            status: status
        }
    })
}

export const getOrderInfo = (id) => {
  return httpInstance({
      url: `/order/${id}`
  })
}